class MenuUtil {
  constructor () {
  }

  static activeMenu (url, index, length) {
    if (length === undefined || length === null) {
      length = 1
    }
    let strings = url.split('/');
    if (index) {
      let s = strings.slice(0, index + length).toString();
      let replace = s.replace(/,/g, "/");
      return replace;
    }
    console.log("return" + url)
    return url;
  }
}

export default MenuUtil;